package org.databasefacade.table.column;

import org.databasefacade.translator.Translator;

public class AliasedColumn {
	private String tableAlias;
	private String columnAlias;
	private Column column;
	private Translator translator;
	public AliasedColumn(Translator translator, Column col, String tabAlias, String colAlias) {
		tableAlias = tabAlias;
		columnAlias = colAlias;
		column = col;
		this.translator = translator;

	}
	public Column getColumn() {
		return column;
	}
	public String getSQL() {
		return translator.getSelectColumn(column.getColumnName(), tableAlias, columnAlias);
	}
	public String toString() {
		return columnAlias;
	}
}
